import warnings


def test_a():
    print("---test_a")
    assert fun() == 1


def fun():
    print("fun函数执行了")
    warnings.warn(UserWarning("自定义warning"))
    return 1
